<!DOCTYPE html>
<html>

<head>
  <title></title>
  <script src="../../lib/svg-compile/lexical.js"></script>
  <script src="../../lib/svg-compile/parser.js"></script>
  <script src="../../lib/svg-compile/transformer.js"></script>
  <script src="../../lib/svg-compile/generator.js"></script>
  <script src="../../lib/svg-compile/compile.js"></script>
</head>

<body>
  <script>
    // 调用svgCompile编译器
    var code = 'Paper 0 Pen 100 Line 0 50 100 50';
    var svg = svgCompile(code);
    console.log(svg);
    document.body.innerHTML = svg;
      /*
打印信息如下：
<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" version="1.1">
<rest x="0" y="0" width="100" height="100" fill="rgb(100%,100%,100%)"></rest>
<line x1="0" y1="50" x2="100" y2="50" stroke-linecap="round" stroke="rgb(0%,0%,0%)"></line>
</svg>
*/
  </script>
</body>

</html>